//
// RS Game Framework
// Copyright © 2010 Jedd Haberstro
// jhaberstro@gmail.com
// 
// $Id:
//

#ifndef RS_GRAPHICS_TEXTURE2DDESCRIPTION_HPP
#define RS_GRAPHICS_TEXTURE2DDESCRIPTION_HPP

#include "rs/graphics/ResourceDescription.hpp"
#include "rs/graphics/TextureFormat.hpp"

namespace rs
{
    namespace graphics
    {
        class Texture2DDescription : public ResourceDescription
        {
            RS_DECLARE_POLYMORPHIC_REFLECTION();
            
        public:
            
            Texture2DDescription(RsSize width, RsSize height, TextureFormat::Enum format, UInt8 mipmaps, ResourceAccess::Enum access, ResourceUsage::Enum usage);
            
            RsSize GetWidth() const;
            
            RsSize GetHeight() const;
            
            TextureFormat::Enum GetFormat() const;
            
            UInt8 GetMipMapCount() const;
            
            void SetWidth(RsSize width);
            
            void SetHeight(RsSize height);
            
            void SetFormat(TextureFormat::Enum format);
            
            void SetMipMapCount(UInt8 mipmap);
        
        private:
            
            RsSize width_;
            RsSize height_;
            TextureFormat::Enum format_;
            UInt8 mipmaps_;
        };
        
                
        inline Texture2DDescription::Texture2DDescription(RsSize width, RsSize height, TextureFormat::Enum format, UInt8 mipmaps, ResourceAccess::Enum access, ResourceUsage::Enum usage)
        : ResourceDescription(ResourceType::Texture2D, access, usage),
          width_(width),
          height_(height),
          format_(format),
          mipmaps_(mipmaps) {
        }
        
        inline RsSize Texture2DDescription::GetWidth() const {
            return width_;
        }
        
        inline RsSize Texture2DDescription::GetHeight() const {
            return height_;
        }
        
        inline TextureFormat::Enum Texture2DDescription::GetFormat() const {
            return format_;
        }
        
        inline UInt8 Texture2DDescription::GetMipMapCount() const {
            return mipmaps_;
        }
        
        inline void Texture2DDescription::SetWidth(RsSize width) {
            width_ = width;
        }
        
        inline void Texture2DDescription::SetHeight(RsSize height) {
            height_ = height;
        }
        
        inline void Texture2DDescription::SetFormat(TextureFormat::Enum format) {
            format_ = format;
        }
        
        inline void Texture2DDescription::SetMipMapCount(UInt8 mipmap) {
            mipmaps_ = mipmap;
        }
    }
}

#endif // RS_GRAPHICS_TEXTURE2DDESCRIPTION_HPP